package com.example.pojo.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 小岁
 * @version 2023/10/24 18:32
 */
//@JsonIgnoreProperties(ignoreUnknown = true)
//@Document(indexName="post_index", createIndex = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PostDocument implements Serializable {
    @Id
    @Field(type = FieldType.Integer)
    private Integer id;
    //职位名
    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_smart")
    private String posName;

    //工作地点
    @Field(type = FieldType.Text)
    private String workPlace;

    //职位描述
    @Field(type = FieldType.Text)
    private String posDescription;

    @Field(type = FieldType.Text)
    private String background;

    @Field(type = FieldType.Integer)
    private Integer jrId;
    @Field(type = FieldType.Text)
    private String posType;
    @Field(type = FieldType.Text)
    private String posKeyword;
    @Field(type = FieldType.Integer)
    private Integer recruitsNum;
    @Field(type = FieldType.Integer)
    private Integer payFloor;
    @Field(type = FieldType.Integer)
    private Integer payUpper;
    @Field(type = FieldType.Text)
    private String specialty;
    @Field(type = FieldType.Text)
    private String sexDemand;
    @Field(type = FieldType.Text)
    private String expDemand;
    @Field(type = FieldType.Text)
    private String ageDemand;
    @Field(type = FieldType.Text)
    private String jobBenefits;
    @Field(type = FieldType.Text)
    private String recruitmentAgency;
    @Field(type = FieldType.Text)
    private String posTelephone;
    @Field(type = FieldType.Text)
    private String posEmail;
    @Field(type = FieldType.Date,format = DateFormat.basic_date_time)
    private Date publishTime;
    @Field(type = FieldType.Integer)
    private Integer publishStatus;
    @Field(type = FieldType.Date,format = DateFormat.basic_date_time)
    private Date publishCycle;
}
